package day07HomeWork;/*
Student、Teacher、Doctor类和Test类
Person类：name、age、address、Person(参)、eat()、sleep()，sayHi()
Student类：继承Person、className、stuId，Student(参)、study()，重写sayHi()方法
Teacher类：继承Person、salary，Teacher(参)、teach()，重写sayHi()方法
Doctor类：继承Person、title，Doctor(参)、cut()
Test：创建对象、调用方法测试*/

public class Doctor extends Person {
    String title;

    Doctor() {

    }

    Doctor(String name, int age, String address, String title) {
        super(name, age, address);
        this.title = title;
    }

    void cut() {
        System.out.println(name + "正在做手术");
    }

    void sayHi() {
        System.out.println("大家好，我叫" + name + "，今年" + age + "岁了，" + "家住" + address + ",医职是" + title);
    }
}
